FIX: Call rustdoc test with the correct cfg flags of a package.
authorJuan Hernández <juan.hernandez.babon@gmail.com>
Mon, 31 Oct 2016 18:15:03 +0000 (19:15 +0100)
committerJuan Hernández <juan.hernandez.babon@gmail.com>
Mon, 31 Oct 2016 21:48:01 +0000 (22:48 +0100)
commite100ee96c209e88a590e4e58243f979f56bc3b88
tree131137bc7d43e75805ccffa1ed25a5bcdbffe969
parent51db8dc8e5da1e3437386c94df3db24dcfb6e1ca
FIX: Call rustdoc test with the correct cfg flags of a package.

There was a situation in which if you you had a lib that depends
on a package with features, whenever you ran the tests for the
package the `rustdoc test` call was failing because rustdoc
was called with the root cfg flags, not the package cfg flags.

This fix solves the issue by keeping track of the cfg flags
per package, so the rustdoc command will be generated with
the correct cfg flags.
src/cargo/ops/cargo_rustc/compilation.rs
src/cargo/ops/cargo_rustc/mod.rs
src/cargo/ops/cargo_test.rs
tests/test.rs